package com.corona.game;

import com.badlogic.gdx.audio.Music;
import com.corona.Game;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;

/* loaded from: pokewilds.jar:com/pkmngen/game/Route.class */
public class Route {
    String name;
    int level;
    ArrayList<Pokemon> storedPokemon;
    Music music;
    int musicsIndex;
    boolean isDungeon;
    boolean dontSpawnOverworlds;
    public static HashMap<String, ArrayList<String>> allowedPokemon = new HashMap<>();
    public static HashMap<String, ArrayList<String>> musics = new HashMap<>();

    public Route(Network.RouteData routeData) {
        this.storedPokemon = new ArrayList<>();
        this.musicsIndex = 0;
        this.isDungeon = false;
        this.dontSpawnOverworlds = false;
        this.name = routeData.name;
        this.level = routeData.level;
        this.musicsIndex = routeData.musicsIndex;
        Iterator<Network.PokemonData> it = routeData.pokemon.iterator();
        while (it.hasNext()) {
            Network.PokemonDataBase pokemonData = it.next();
            pokemonData.isInterior = false;
            this.storedPokemon.add(new Pokemon(pokemonData));
        }
        init();
    }

    public Route(String name, int level) {
        this.storedPokemon = new ArrayList<>();
        this.musicsIndex = 0;
        this.isDungeon = false;
        this.dontSpawnOverworlds = false;
        this.name = name;
        this.level = level;
        init();
    }

    public void init() {
        if (this.name.equals("pkmnmansion1")) {
            this.isDungeon = true;
        }
        if (this.name.equals("fossil_lab1")) {
            this.isDungeon = true;
        }
        if (this.name.equals("regi_cave1")) {
            this.isDungeon = true;
        }
        if (this.name.equals("ruins1_inner")) {
            this.isDungeon = true;
        }
    }

    public String type() {
        if (this.name.equals("desert1") || this.name.equals("ruins1_outer") || this.name.equals("oasis1") || this.name.equals("sand_pit1")) {
            return "desert";
        }
        if (this.name.equals("graveyard1")) {
            return "graveyard";
        }
        if (this.name.equals("volcano1")) {
            return "volcano";
        }
        if (this.name.equals("deep_forest")) {
            return "deep_forest";
        }
        return "";
    }

    public ArrayList<String> musics() {
        if (!musics.containsKey(this.name)) {
            ArrayList<String> musics2 = new ArrayList<>();
            if (this.name.equals("ruins1_inner")) {
                musics2.add("relic_castle2");
                musics2.add("relic_castle2");
            } else if (this.name.equals("fossil_lab1")) {
                musics2.add("silence1");
                musics2.add("silence1");
            } else if (this.name.equals("graveyard1")) {
                musics2.add("old_chateau3");
                musics2.add("old_chateau3");
            } else if (this.name.equals("pkmnmansion1")) {
                musics2.add("pkmnmansion");
                musics2.add("pkmnmansion");
            } else if (this.name.equals("regi_cave1")) {
                musics2.add("sealed_chamber2");
                musics2.add("sealed_chamber2");
            } else if (this.name.equals("desert1") || this.name.equals("ruins1_outer") || this.name.equals("oasis1") || this.name.equals("sand_pit1")) {
                musics2.add("route_111-2");
                musics2.add("route_111-2");
            } else if (this.name.equals("volcano1")) {
                musics2.add("ambient_rumbling");
                musics2.add("ambient_rumbling");
            } else if (this.name.equals("deep_forest")) {
                musics2.add("DP_EternaForest");
                musics2.add("DP_EternaForest");
            } else if (this.name.equals("wooded_lake1") || this.name.equals("wooded_lake_water1")) {
                musics2.add("lake6");
                musics2.add("BW_Dreamyard-stitched");
                musics2.add("national_park1");
                musics2.add("pokemon_tcg_gym1");
                musics2.add("overw3");
                musics2.add("DP_League");
            } else if (this.name.equals("snow1")) {
                musics2.add("pokemon_tcg_gym1");
                musics2.add("overw3");
                musics2.add("DP_Route216-stitched");
                musics2.add("national_park1");
            } else {
                musics2.add("pokemon_tcg_gym1");
                musics2.add("overw3");
                musics2.add("route_42");
                musics2.add("national_park1");
                musics2.add("viridian_forest_gs");
                musics2.add("route_3_gs");
                musics2.add("route_3_rb");
                musics2.add("route_1");
                musics2.add("route_idk1");
            }
            musics.put(this.name, musics2);
        }
        return musics.get(this.name);
    }

    public ArrayList<String> allowedPokemon() {
        if (!allowedPokemon.containsKey(this.name)) {
            ArrayList<String> allowedPokemon2 = new ArrayList<>();
            if (this.name.equals("mountain1")) {
                allowedPokemon2.add("rhydon");
                allowedPokemon2.add("rhyhorn");
                allowedPokemon2.add("onix");
                allowedPokemon2.add("machop");
                allowedPokemon2.add("machoke");
                allowedPokemon2.add("cubone");
                allowedPokemon2.add("phanpy");
                allowedPokemon2.add("skarmory");
                allowedPokemon2.add("whismur");
                allowedPokemon2.add("makuhita");
                allowedPokemon2.add("duraludon");
            } else if (this.name.equals("mountain1_water1")) {
                allowedPokemon2.add("magikarp");
                allowedPokemon2.add("poliwag");
                allowedPokemon2.add("goldeen");
            } else if (this.name.equals("deep_forest")) {
                allowedPokemon2.add("zubat");
                allowedPokemon2.add("golbat");
                allowedPokemon2.add("houndour");
                allowedPokemon2.add("murkrow");
                allowedPokemon2.add("nidorina");
                allowedPokemon2.add("nidorino");
                allowedPokemon2.add("scyther");
                allowedPokemon2.add("pinsir");
                allowedPokemon2.add("growlithe");
                allowedPokemon2.add("vulpix");
                allowedPokemon2.add("breloom");
                allowedPokemon2.add("sableye");
                allowedPokemon2.add("ralts");
                allowedPokemon2.add("gastly");
                allowedPokemon2.add("volbeat");
                allowedPokemon2.add("noibat");
            } else if (this.name.equals("forest1")) {
                allowedPokemon2.add("oddish");
                allowedPokemon2.add("gloom");
                allowedPokemon2.add("pidgey");
                allowedPokemon2.add("spearow");
                allowedPokemon2.add("taillow");
                allowedPokemon2.add("hoppip");
                allowedPokemon2.add("bulbasaur");
                allowedPokemon2.add("charmander");
                allowedPokemon2.add("chikorita");
                allowedPokemon2.add("paras");
                allowedPokemon2.add("pikachu");
                allowedPokemon2.add("weedle");
                allowedPokemon2.add("caterpie");
                allowedPokemon2.add("spinarak");
                allowedPokemon2.add("ledyba");
                allowedPokemon2.add("hoothoot");
                allowedPokemon2.add("shroomish");
                allowedPokemon2.add("combee");
            } else if (this.name.equals("savanna1")) {
                allowedPokemon2.add("ponyta");
                allowedPokemon2.add("miltank");
                for (int i = 0; i < 2; i++) {
                    allowedPokemon2.add("drowzee");
                    allowedPokemon2.add("oddish");
                    allowedPokemon2.add("chikorita");
                    allowedPokemon2.add("bulbasaur");
                    allowedPokemon2.add("hoppip");
                    allowedPokemon2.add("pidgey");
                    allowedPokemon2.add("taillow");
                    allowedPokemon2.add("charmander");
                    allowedPokemon2.add("cyndaquil");
                    allowedPokemon2.add("mareep");
                    allowedPokemon2.add("ekans");
                    allowedPokemon2.add("doduo");
                    allowedPokemon2.add("sentret");
                    allowedPokemon2.add("rattata");
                    allowedPokemon2.add("yanma");
                    allowedPokemon2.add("poochyena");
                    allowedPokemon2.add("eevee");
                    allowedPokemon2.add("cutiefly");
                    allowedPokemon2.add("shinx");
                }
            } else if (this.name.equals("savanna2")) {
                allowedPokemon2.add("ponyta");
                allowedPokemon2.add("miltank");
                allowedPokemon2.add("tauros");
                allowedPokemon2.add("drowzee");
                allowedPokemon2.add("spearow");
                allowedPokemon2.add("girafarig");
                allowedPokemon2.add("aipom");
                allowedPokemon2.add("doduo");
                allowedPokemon2.add("sentret");
                allowedPokemon2.add("rattata");
                allowedPokemon2.add("yanma");
                allowedPokemon2.add("eevee");
                allowedPokemon2.add("shinx");
                allowedPokemon2.add("chansey");
                allowedPokemon2.add("scyther");
                allowedPokemon2.add("pinsir");
                allowedPokemon2.add("rhyhorn");
                allowedPokemon2.add("nidoran_m");
                allowedPokemon2.add("nidoran_f");
                allowedPokemon2.add("kangaskhan");
                allowedPokemon2.add("phanpy");
                allowedPokemon2.add("natu");
                allowedPokemon2.add("mankey");
                allowedPokemon2.add("mareep");
                allowedPokemon2.add("plusle");
                allowedPokemon2.add("minun");
            } else if (this.name.equals("beach1")) {
                allowedPokemon2.add("squirtle");
                allowedPokemon2.add("krabby");
                allowedPokemon2.add("totodile");
                allowedPokemon2.add("shellder");
                allowedPokemon2.add("wooper");
                allowedPokemon2.add("staryu");
                allowedPokemon2.add("marill");
                allowedPokemon2.add("slowpoke");
                allowedPokemon2.add("psyduck");
                allowedPokemon2.add("wingull");
                allowedPokemon2.add("corphish");
            } else if (this.name.equals("beach2")) {
                allowedPokemon2.add("squirtle");
                allowedPokemon2.add("krabby");
                allowedPokemon2.add("totodile");
                allowedPokemon2.add("shellder");
                allowedPokemon2.add("wooper");
                allowedPokemon2.add("staryu");
                allowedPokemon2.add("marill");
                allowedPokemon2.add("slowpoke");
                allowedPokemon2.add("psyduck");
                allowedPokemon2.add("corphish");
                allowedPokemon2.add("octillery");
                allowedPokemon2.add("araichu");
                allowedPokemon2.add("aexeggutor");
                allowedPokemon2.add("sandygast");
                allowedPokemon2.add("pikipek");
            } else if (this.name.equals("beach2_rocks")) {
                allowedPokemon2.add("corsola");
                allowedPokemon2.add("corsola");
                allowedPokemon2.add("corsola");
                allowedPokemon2.add("corsola");
                allowedPokemon2.add("squirtle");
                allowedPokemon2.add("krabby");
                allowedPokemon2.add("totodile");
                allowedPokemon2.add("shellder");
                allowedPokemon2.add("staryu");
                allowedPokemon2.add("corphish");
            } else if (this.name.equals("beach2_plateau")) {
                allowedPokemon2.add("corsola");
                allowedPokemon2.add("corsola");
                allowedPokemon2.add("corsola");
                allowedPokemon2.add("corsola");
                allowedPokemon2.add("squirtle");
                allowedPokemon2.add("krabby");
                allowedPokemon2.add("totodile");
                allowedPokemon2.add("shellder");
                allowedPokemon2.add("staryu");
                allowedPokemon2.add("corphish");
                allowedPokemon2.add("wingull");
            } else if (this.name.equals("beach2_water")) {
                for (int i2 = 0; i2 < 3; i2++) {
                    allowedPokemon2.add("staryu");
                    allowedPokemon2.add("squirtle");
                    allowedPokemon2.add("mantine");
                    allowedPokemon2.add("totodile");
                    allowedPokemon2.add("tentacool");
                    allowedPokemon2.add("magikarp");
                }
                allowedPokemon2.add("lapras");
                allowedPokemon2.add("araichu");
            } else if (this.name.equals("desert1")) {
                allowedPokemon2.add("kangaskhan");
                allowedPokemon2.add("cubone");
                allowedPokemon2.add("numel");
                allowedPokemon2.add("camerupt");
                allowedPokemon2.add("drapion");
            } else if (this.name.equals("wooded_lake1")) {
                allowedPokemon2.add("pidgey");
                allowedPokemon2.add("ledyba");
                allowedPokemon2.add("cutiefly");
                allowedPokemon2.add("hoothoot");
                allowedPokemon2.add("zubat");
                allowedPokemon2.add("paras");
                allowedPokemon2.add("scyther");
                allowedPokemon2.add("pinsir");
                allowedPokemon2.add("spinarak");
                allowedPokemon2.add("murkrow");
                allowedPokemon2.add("chingling");
                allowedPokemon2.add("pichu");
                allowedPokemon2.add("ekans");
                allowedPokemon2.add("oddish");
                allowedPokemon2.add("natu");
                allowedPokemon2.add("taillow");
                allowedPokemon2.add("ralts");
                allowedPokemon2.add("shroomish");
                allowedPokemon2.add("phanpy");
                allowedPokemon2.add("wooper");
                allowedPokemon2.add("yanma");
                allowedPokemon2.add("azurill");
                allowedPokemon2.add("exeggcute");
                allowedPokemon2.add("slowpoke");
                allowedPokemon2.add("poliwag");
                allowedPokemon2.add("makuhita");
            } else if (this.name.equals("wooded_lake_water1")) {
                allowedPokemon2.add("magikarp");
                allowedPokemon2.add("surskit");
                allowedPokemon2.add("lotad");
                allowedPokemon2.add("wooper");
                allowedPokemon2.add("azurill");
                allowedPokemon2.add("goldeen");
                allowedPokemon2.add("buizel");
            } else if (this.name.equals("wooded_lake_fishing1")) {
                allowedPokemon2.add("magikarp");
                allowedPokemon2.add("poliwag");
                allowedPokemon2.add("goldeen");
                allowedPokemon2.add("dratini");
                allowedPokemon2.add("feebas");
                allowedPokemon2.add("corphish");
            } else if (this.name.equals("graveyard1")) {
                allowedPokemon2.add("gastly");
                allowedPokemon2.add("litwick");
                allowedPokemon2.add("murkrow");
                allowedPokemon2.add("drifloon");
                allowedPokemon2.add("misdreavus");
                allowedPokemon2.add("zubat");
                allowedPokemon2.add("chingling");
                allowedPokemon2.add("chimecho");
                allowedPokemon2.add("cubone");
                allowedPokemon2.add("houndour");
                allowedPokemon2.add("hoothoot");
                allowedPokemon2.add("spinarak");
                allowedPokemon2.add("absol");
                allowedPokemon2.add("duskull");
            } else if (this.name.equals("sand_pit1")) {
                allowedPokemon2.add("diglett");
                allowedPokemon2.add("sandile");
            } else if (this.name.equals("oasis1")) {
                allowedPokemon2.add("surskit");
                allowedPokemon2.add("poliwag");
                allowedPokemon2.add("lotad");
                allowedPokemon2.add("lombre");
                allowedPokemon2.add("zigzagoon");
                allowedPokemon2.add("sandshrew");
                allowedPokemon2.add("exeggcute");
            } else if (this.name.equals("ruins1_outer")) {
                allowedPokemon2.add("sigilyph");
                allowedPokemon2.add("natu");
                allowedPokemon2.add("nosepass");
                allowedPokemon2.add("beldum");
                allowedPokemon2.add("metang");
                allowedPokemon2.add("smeargle");
                allowedPokemon2.add("solrock");
                allowedPokemon2.add("bronzor");
            } else if (this.name.equals("ruins1_inner")) {
                allowedPokemon2.add("lunatone");
                allowedPokemon2.add("elgyem");
                allowedPokemon2.add("duskull");
                allowedPokemon2.add("sandile");
                allowedPokemon2.add("sandshrew");
            } else if (this.name.equals("snow1")) {
                allowedPokemon2.add("larvitar");
                allowedPokemon2.add("sneasel");
                allowedPokemon2.add("aron");
                allowedPokemon2.add("swinub");
                allowedPokemon2.add("piloswine");
                allowedPokemon2.add("jynx");
                allowedPokemon2.add("delibird");
                allowedPokemon2.add("snorunt");
                allowedPokemon2.add("riolu");
                allowedPokemon2.add("gdarumaka");
            } else if (!this.name.equals("fossil_lab1")) {
                if (this.name.equals("pkmnmansion1")) {
                    allowedPokemon2.add("magmar");
                    allowedPokemon2.add("grimer");
                    allowedPokemon2.add("rattata");
                    allowedPokemon2.add("koffing");
                    allowedPokemon2.add("vulpix");
                    allowedPokemon2.add("growlithe");
                    allowedPokemon2.add("ponyta");
                    allowedPokemon2.add("ditto");
                } else if (this.name.equals("regi_cave1")) {
                    allowedPokemon2.clear();
                } else if (this.name.equals("oasis_pond1")) {
                    allowedPokemon2.add("poliwag");
                    allowedPokemon2.add("goldeen");
                    allowedPokemon2.add("feebas");
                    allowedPokemon2.add("remoraid");
                } else if (this.name.equals("sea1")) {
                    allowedPokemon2.add("tentacool");
                    allowedPokemon2.add("magikarp");
                    allowedPokemon2.add("corsola");
                    allowedPokemon2.add("horsea");
                    allowedPokemon2.add("qwilfish");
                } else if (this.name.equals("ocean1")) {
                    allowedPokemon2.add("carvanha");
                } else if (this.name.equals("river1")) {
                    allowedPokemon2.add("magikarp");
                    allowedPokemon2.add("poliwag");
                    allowedPokemon2.add("goldeen");
                    allowedPokemon2.add("remoraid");
                } else if (this.name.equals("sand_fishing1")) {
                    allowedPokemon2.add("trapinch");
                    allowedPokemon2.add("trapinch");
                    allowedPokemon2.add("sandile");
                    allowedPokemon2.add("sandile");
                    allowedPokemon2.add("gible");
                } else if (this.name.equals("rock_smash1")) {
                    allowedPokemon2.add("geodude");
                    allowedPokemon2.add("geodude");
                    allowedPokemon2.add("shuckle");
                } else if (this.name.equals("")) {
                    allowedPokemon2.clear();
                } else if (this.name.equals("volcano1")) {
                    allowedPokemon2.add("slugma");
                    allowedPokemon2.add("geodude");
                    allowedPokemon2.add("charmander");
                    allowedPokemon2.add("magmar");
                    allowedPokemon2.add("torkoal");
                    allowedPokemon2.add("cubone");
                    allowedPokemon2.add("koffing");
                    allowedPokemon2.add("diglett");
                    allowedPokemon2.add("numel");
                    allowedPokemon2.add("amarowak");
                } else {
                    allowedPokemon2.clear();
                    allowedPokemon2.add("mamoswine");
                    allowedPokemon2.add("weavile");
                    allowedPokemon2.add("magmortar");
                    allowedPokemon2.add("electivire");
                    allowedPokemon2.add("metagross");
                }
            }
            allowedPokemon.put(this.name, allowedPokemon2);
        }
        return allowedPokemon.get(this.name);
    }

    public String getNextMusic(boolean random) {
        int nextIndex;
        if (random) {
            nextIndex = this.musicsIndex;
            while (nextIndex == this.musicsIndex) {
                nextIndex = Game.staticGame.map.rand.nextInt(musics().size());
            }
        } else {
            nextIndex = (this.musicsIndex + 1) % musics().size();
        }
        this.musicsIndex = nextIndex;
        return musics().get(this.musicsIndex);
    }

    public ArrayList<String> goodRodPokemon() {
        ArrayList<String> pokemon = new ArrayList<>();
        pokemon.add("corsola");
        pokemon.add("horsea");
        return pokemon;
    }

    public ArrayList<String> superRodPokemon() {
        ArrayList<String> pokemon = new ArrayList<>();
        pokemon.add("feebas");
        pokemon.add("remoraid");
        pokemon.add("qwilfish");
        pokemon.add("gible");
        return pokemon;
    }

    public ArrayList<String> dayPokemon() {
        ArrayList<String> dayPokemon = new ArrayList<>();
        dayPokemon.add("ledyba");
        dayPokemon.add("ledian");
        dayPokemon.add("sunkern");
        dayPokemon.add("sunflora");
        dayPokemon.add("spearow");
        dayPokemon.add("fearow");
        dayPokemon.add("pidgey");
        dayPokemon.add("pidgeotto");
        dayPokemon.add("pidgeot");
        dayPokemon.add("ponyta");
        dayPokemon.add("rapidash");
        dayPokemon.add("growlithe");
        dayPokemon.add("arcanine");
        dayPokemon.add("doduo");
        dayPokemon.add("dodrio");
        dayPokemon.add("hoppip");
        dayPokemon.add("skiploom");
        dayPokemon.add("jumpluff");
        dayPokemon.add("miltank");
        dayPokemon.add("tauros");
        dayPokemon.add("solrock");
        dayPokemon.add("sentret");
        dayPokemon.add("furret");
        dayPokemon.add("bellossom");
        dayPokemon.add("mawile");
        dayPokemon.add("yanma");
        return dayPokemon;
    }

    public ArrayList<String> nightPokemon() {
        ArrayList<String> nightPokemon = new ArrayList<>();
        nightPokemon.add("hoothoot");
        nightPokemon.add("noctowl");
        nightPokemon.add("spinarak");
        nightPokemon.add("ariados");
        nightPokemon.add("houndour");
        nightPokemon.add("houndoom");
        nightPokemon.add("poochyena");
        nightPokemon.add("mightyena");
        nightPokemon.add("oddish");
        nightPokemon.add("gloom");
        nightPokemon.add("vileplume");
        nightPokemon.add("murkrow");
        nightPokemon.add("honchkrow");
        nightPokemon.add("sneasel");
        nightPokemon.add("zubat");
        nightPokemon.add("golbat");
        nightPokemon.add("crobat");
        nightPokemon.add("lunatone");
        nightPokemon.add("cleffa");
        nightPokemon.add("clefairy");
        nightPokemon.add("clefable");
        nightPokemon.add("igglybuff");
        nightPokemon.add("jigglypuff");
        nightPokemon.add("wigglytuff");
        nightPokemon.add("sableye");
        nightPokemon.add("gastly");
        nightPokemon.add("haunter");
        nightPokemon.add("gengar");
        return nightPokemon;
    }
}
